package cn.biplam.front.component.view.systemManage.datasource.callback;

import cn.biplam.common.struc.MdStruc;
import cn.biplam.common.tools.TOOLS;
import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.common.wrapper.Result;
import cn.biplam.common.wrapper.UserInfo;
import cn.biplam.front.callback.CallBack;
import cn.biplam.front.html.base.HtmlWindow;
import cn.biplam.front.template.base.Text;

/**
 * 数据源管理-数据库类型绑定器
 * @author Wangsong 2009-6-22下午03:59:24
 * @version 1.0
 */
public class DbSourceNameCallBack implements CallBack{

	public HtmlWindow[] getGroup(Result data, String homeUrl, UserInfo mUser)
	throws ErrorMessage {
		HtmlWindow[] opetator=new HtmlWindow[1];

		/** 数据库类型ID */
		String dsName = data.getString(MdStruc.DbSourStruc.DB_SOURCE_NAME);
		opetator[0]= new Text(dsName).get(); 
		opetator[0].setTitle(data.getString(MdStruc.DbSourStruc.DB_SOURCE_DESC));
		opetator[0].setLength(TOOLS.getTextLength(dsName));
		return opetator;
	}

}
